export default {
    state: {
        userInfo: JSON.parse(sessionStorage.getItem('userInfo')) || {},
    },
    mutations: {
        setUserInfo(state, log) {
            sessionStorage.setItem(`userInfo`, JSON.stringify(log))
            state.userInfo = log;
        },
    },
    actions: {
        setUserInfo({ commit }, log) {
            commit("setUserInfo", log);
        },
    },
    getters: {
        getUserInfo(state) {
            return state.userInfo;
        },
    }
}
